/*
 * TestDump.h
 *
 *  Created on: 2012/05/30
 *      Author: guanxiaoying
 */

#ifndef TESTDUMP_H_
#define TESTDUMP_H_
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include "typedef.h"
#include "Id.h"
#include "lib_func.h"
#include "core.h"
#include "./memory/mem_interface.h"
#include "./textfile/pf_file.h"
#include "encode.h"
enum _XML_KEY_TAG_{
 XML_ERROR=0x0000,
 XML_RECORD		,
 XML_FILE		,
 XML_CODESCOPE			,
 XML_LINKAGE		,
 XML_TYPE		,
 XML_SYMBOL	,
 XML_CONSTANT,
 XML_DECLARATION		,
 XML_TYPESPECIFIER		,
 XML_DECLARATOR		,
 XML_INITIALIZER	,
 XML_STATEMENT		,
 XML_EXPRESSION	,
 XML_DESIGNATION   ,
 XML_STRINGLITERAL,
 XML_UNITECHAIN,
 XML_PPTOKENLIST,
 XML_DIRECTIVE,
 XML_MACROINFO,
 XML_PPCONDEXP,
 XML_REPLSTTKN,
 XML_VALUE		,
 XML_STRINGVALUE,
 XML_FLAG,
 XML_LOCATION,
 XML_KIND,
 XML_NAME

};

typedef struct _TAG_KEY_LIST{
	PSZ key;
	U2  id;
	/* extension point for reading functions */
}TYPE_KEY_LIST;
extern TYPE_KEY_LIST stKeyList[];
extern CHAR file_buf[OS_FULLPATH+4];
extern CHAR tempBuf[OS_FULLPATH+64];
extern CHAR constantBuffer[50];
extern char * const top_header;
extern char * const top_end ;
extern char * const header_format;
extern char * const tail_format;
extern char * const sub_tab_header_format;
extern char * const sub_tab_tail_format;
extern char * const sub_value_header_format ;
extern char * const sub_value_tail_format;
PSZ dumpGetStr( U2 id );
S4 dumpOutputStreamInit_file( PSZ pszPath );
VOID dumpOutputStream( PSZ str );
VOID dumpParameterStr( PSZ str );
VOID dumpOutputStreamEnd_file( VOID );
VOID dumpOutputStream( PSZ str );
VOID dumpCodeScopeAsField( AST astCodeScp );
PSZ  dumpGetConstant( AST astValue );
VOID dumpXMLConvert( CHAR c, PSZ str );
#endif /* TESTDUMP_H_ */
